/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package finder.filters;

import java.util.HashSet;
import java.util.List;
import finder.ISecondaryFilter;

/**
 *
 * @author Alex
 */
public class DuplicateFilter implements ISecondaryFilter
{
    @Override
    public void applyFilter(List<String> input) 
    {
        HashSet trackof = new HashSet();
        for(int x = 0; x < input.size();)
        {
            String value = input.get(x);
            if(!trackof.add(value))
                input.remove(value);
            else
                x++;
        }
    }
}
